// 2025.05.13 08:17:17 星期二 晴 昨天 打了声 招呼 就被拉黑了... 冷酷男人
// 前两天 开始 出 茧
// 我见过飞碟 石沉大海 ...

import { create_winload } from '../../../../../../../../../../global/win_load';
import { win_route } from '../../../../../../../../../Func/route_operate';
import {
  props_win_load_ns_tag,
  spacename_win_load_ns_tag,
} from '../../../../../../../../unitComps/newFloatTagEl_settings/comps/ns_tag/DataDefine/sourceData';
import {
  props_win_load_float_info,
  spacename_float_info,
} from '../../../../../../../float_info/DataDefine/sourceData';

// 模拟 创建 domTree

/**
 * 接口 动态的 生成 功能性 按钮 列
 */

const span_info_create_new_float_el = '新创建浮动元素';

const span_info_world_area = '文字领域';

const span_info_operate_cur_float = '元素操作';

const float_setting_list_info = {
  data: ['create_new_float_el', 'world_area', 'operate_cur_float'],
  create_new_float_el: {
    span_tag: span_info_create_new_float_el,
    click_fuc: create_new_float_el_click,
  },
  world_area: {
    span_tag: span_info_world_area,
    click_fuc: world_area_el_click,
  },
  operate_cur_float: {
    span_tag: span_info_operate_cur_float,
    click_fuc: operate_cur_float,
  },
};

function create_new_float_el_click() {
  console.log('新创建浮动元素');
  let route = win_route();

  let winload_ns_tag = create_winload(spacename_win_load_ns_tag);
  winload_ns_tag.set_winload_key_val(props_win_load_ns_tag.floatEl_id, '#k463');
  winload_ns_tag.set_winload_key_val(props_win_load_ns_tag.for_page, 'main');
  // console.log(winload_ns_tag);
  // route;
  route.go('create_new_float');
}

function world_area_el_click() {
  console.log('开启 文字领域');
}

function operate_cur_float() {
  console.log('开启 操作 模式');
  let route = win_route();

  let winload_ns_tag = create_winload(spacename_float_info);
  winload_ns_tag.set_winload_key_val(
    props_win_load_float_info.float_keyVal,
    '#k463'
  );
  route.go('float_info');
}

export { float_setting_list_info };
